/* 右侧导航交互效果 */
(function () {
 $(document).ready(function () {
  $('#vertical-nav-wrap').mouseenter(function () {
    $(this).stop().animate({
        'right': '0'
      }, 400, 'swing');
    $('.vertical-nav-hd').css('backgroundPosition', '0 0');
  })
  .mouseleave(function () {
    $(this).stop().animate({
        'right': '-73px'
      }, 400, 'swing', function () {
        $('.vertical-nav-hd').css('backgroundPosition', '-87px 0');
      });
  });
  
  $("#myhome").hover(function() {
	  		$('.horizontal-nav').css('z-index','10000');
			$('.home').css('background', 'url(./static/css/student/img/myhome.png) no-repeat');
		}, function() {
			$('.home').css('background', 'none');
			$('.horizontal-nav').css('z-index','1');
		});
  
  $("#mycourse").hover(function() {
	  $('.horizontal-nav').css('z-index','10000');
		$('.course').css('background', 'url(./static/css/student/img/mycourse.png) no-repeat');
	}, function() {
		$('.course').css('background', 'none');
		$('.horizontal-nav').css('z-index','1');
	});
  
  $("#mybtable").hover(function() {
	  $('.horizontal-nav').css('z-index','10000');
		$('.btable').css('background', 'url(./static/css/student/img/myresource.png) no-repeat');
	}, function() {
		$('.btable').css('background', 'none');
		$('.horizontal-nav').css('z-index','1');
	}); 

//  $("#myCourseRegist").hover(function() {
//	  $('.horizontal-nav').css('z-index','10000');
//		$('.courseRegist').css('background', 'url(./static/css/student/img/myCourseRegist.png) no-repeat');
//	}, function() {
//		$('.courseRegist').css('background', 'none');
//		$('.horizontal-nav').css('z-index','1');
//	});
//  
//  $("#myHomeworkSubmit").hover(function() {
//	  $('.horizontal-nav').css('z-index','10000');
//		$('.homeworkSubmit').css('background', 'url(./static/css/student/img/myHomeworkSubmit.png) no-repeat');
//	}, function() {
//		$('.homeworkSubmit').css('background', 'none');
//		$('.horizontal-nav').css('z-index','1');
//	});
  
  
  $("#myinfo").hover(function() {
	  $('.horizontal-nav').css('z-index','10000');
		$('.myinfo').css('background', 'url(./static/css/student/img/myinfo.png) no-repeat');
	}, function() {
		$('.myinfo').css('background', 'none');
		$('.horizontal-nav').css('z-index','1');
	});   

 });
})();
